<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue 路由概念</title>
    <script src="https://cdn.jsdelivr.net/npm/moment@2.18.1/min/moment.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
    <script src="https://unpkg.com/browse/ant-design-vue@1.6.1/dist/antd.min.js"></script>
    <script src="https://unpkg.com/browse/ant-design-vue@1.6.1/dist/antd.min.css"></script>

</head>

<body>
    <div id="app">
        <template>
            <a-layout id="components-layout-demo-top" class="layout">
                <a-layout-header>
                    <div class="logo" />
                    <a-menu theme="dark" mode="horizontal" :default-selected-keys="['2']"
                        :style="{ lineHeight: '64px' }">
                        <a-menu-item key="1">
                            nav 1
                        </a-menu-item>
                        <a-menu-item key="2">
                            nav 2
                        </a-menu-item>
                        <a-menu-item key="3">
                            nav 3
                        </a-menu-item>
                    </a-menu>
                </a-layout-header>
                <a-layout-content style="padding: 0 50px">
                    <a-breadcrumb style="margin: 16px 0">
                        <a-breadcrumb-item>Home</a-breadcrumb-item>
                        <a-breadcrumb-item>List</a-breadcrumb-item>
                        <a-breadcrumb-item>App</a-breadcrumb-item>
                    </a-breadcrumb>
                    <div :style="{ background: '#fff', padding: '24px', minHeight: '280px' }">
                        Content
                    </div>
                </a-layout-content>
                <a-layout-footer style="text-align: center">
                    Ant Design ©2018 Created by Ant UED
                </a-layout-footer>
            </a-layout>
        </template>

    </div>
    <style>
        #components-layout-demo-top .logo {
            width: 120px;
            height: 31px;
            background: rgba(255, 255, 255, 0.2);
            margin: 16px 24px 16px 0;
            float: left;
        }

    </style>
</body>
<script>
    // // 1. 定义 (路由) 组件。
    // // 可以从其他文件 import 进来
    // const news = { template: '<h2>行业新闻页面</h2>' }
    // const works = { template: '<h2>经典案例页面</h2>' }

    // // 2. 定义路由
    // const routes = [
    //     { path: '/news', component: news },
    //     { path: '/works', component: works }
    // ]

    // // 3. 创建 router 实例，然后传 `routes` 配置
    // const router = new VueRouter({
    //     routes // (缩写) 相当于 routes: routes
    // })

    // 4. 创建和挂载根实例。
    // 记得要通过 router 配置参数注入路由，
    // 从而让整个应用都有路由功能
    Vue.use('antd')
    const app = new Vue({
        el: '#app',
        components: antd
        // router: router
    })
</script>

</html>
